#include <iostream>
#include <fstream>
#include <vector>
#include "point.h"
#include <gmp.h>

std::ifstream in ("in.txt");
std::ofstream out ("out.txt");

const double eps = 4 * std::numeric_limits<double>::epsilon();

std::vector<point> triangle(point a, point b, point c)
{
	std::vector<point> ans;
	if (a.x > b.x) 
	{
		std::swap(a, b);
	}
	if (a.x > c.x)
	{
		std::swap(a, c);
	}
	if (b.x > c.x)
	{
		std::swap(b, c);
	}
	double dxac = 0, dxab = 0, dxbc = 0;
	if (a.x != b.x)
	{
		dxab = (b.y - a.y) / (b.x - a.x);
	}
	if (a.x != c.x)
	{
		dxac = (c.y - a.y) / (c.x - a.x);
	}
	if (b.x != c.x)
	{
		dxbc = (c.y - b.y) / (c.x - b.x);
	}
	double _dxac = dxac;
	if (dxab < dxac) 
	{
		std::swap(dxab, dxac);
	}
	double hy1 = (a.y - dxac * (a.x - ((int)a.x)));
	double hy2 = (a.y - dxab * (a.x - ((int)a.x)));
	hy1 += dxac;
	hy2 += dxab;
	double begin = std::min(hy1, a.y);
	double end = std::max(std::min(hy2 - eps, b.y), a.y);
	for (int i = (int)begin; i <= (int)end; ++i)
	{
		point p;
		p.x = (int)a.x;
		p.y = i;
		ans.push_back(p);
	}
	for (int i = (int)a.x + 1; i < (int)b.x; ++i) 
	{
		for (int j = (int)hy1; j <= (int)hy2; ++j)
		{
			point p;
			p.x = i;
			p.y = j;
			ans.push_back(p);
		}
		hy2 += dxab;
		hy1 += dxac;
	}


	if (b.y > c.y)
	{
		hy1 += (b.y - hy2) * dxab / dxac;
		hy2 = b.y;
	} 
	else
	{
		hy2 += (b.y - hy1) * dxab / dxac;
		hy1 = b.y;
	}

	if (_dxac < dxbc) 
	{
		std::swap(_dxac, dxbc);
	}
	for (int i = (int)b.x; i <= (int)c.x; ++i) 
	{
		for (int j = (int)hy1; j <= (int)hy2; ++j)
		{
			point p;
			p.x = i;
			p.y = j;
			ans.push_back(p);
		}
		hy2 += dxbc;
		hy1 += _dxac;
	}
	return ans;
}

int main()
{
	point a, b, c;
	in >> a.x >> a.y;
	in >> b.x >> b.y;
	in >> c.x >> c.y;
	std::vector<point> answer = triangle(a, b, c);
	out << answer.size() << std::endl;
	for (size_t i = 0; i < answer.size(); ++i)
	{
		out << answer[i].x << ' ' << answer[i].y << std::endl;
	}
	return 0;
}
